//
//  AppDelegate+3DTouch.swift
//  QDMetroClient
//
//  Created by YueWen on 2019/3/18.
//  Copyright © 2019 YueWen. All rights reserved.
//

import Foundation

extension QDMetroAppDelegate {
    
    /// 创建3D touch Item
    @objc func createShortcutItems(){
        
        // 地铁
        let metro = UIApplicationShortcutItem(type: QDCodeSettingConfiguration.QDCodeSettingType.metro.rawValue, localizedTitle: "乘地铁", localizedSubtitle: nil, icon: UIApplicationShortcutIcon(templateImageName: "sitem_chengditie"))
        // 公交
        let bus = UIApplicationShortcutItem(type: QDCodeSettingConfiguration.QDCodeSettingType.bus.rawValue, localizedTitle: "坐公交", localizedSubtitle: nil, icon: UIApplicationShortcutIcon(templateImageName: "sitem_zuogongjiao"))
        
        UIApplication.shared.shortcutItems = [bus,metro]
    }
}
